package com.lantosec.hmrp.modules.category.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.lantosec.hmrp.core.mvc.BaseVO;
import com.lantosec.hmrp.modules.category.entity.AssetsCheckNote;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 盘点记录 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-04-02
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="AssetsCheckNote对象", description="盘点记录")
public class AssetsCheckNoteVO extends BaseVO<AssetsCheckNote> {
    private static final long serialVersionUID = 1L;


    public AssetsCheckNoteVO(AssetsCheckNote entity){
        this.noteId = entity.getNoteId();
        this.planId = entity.getPlanId();
        this.checkType = entity.getCheckType();
        this.deptId = entity.getDeptId();
        this.areaId = entity.getAreaId();
        this.assetsId = entity.getAssetsId();
        this.checkState = entity.getCheckState();
        this.checkDescribe = entity.getCheckDescribe();
        this.photoList = entity.getPhotoList();
        this.checkTime = entity.getCheckTime();
        this.checkUserId = entity.getCheckUserId();
        this.checkUser = entity.getCheckUser();
        this.reviewState = entity.getReviewState();
        this.reviewTime = entity.getReviewTime();
        this.reviewUserId = entity.getReviewUserId();
        this.reviewUser = entity.getReviewUser();
        this.pictureUrl = entity.getPictureUrl();
        this.lableType = entity.getLableType();
        this.checkPictureUrl = entity.getCheckPictureUrl();
        this.summaryNumber = entity.getSummaryNumber();
        this.assetsName = entity.getAssetsName();
        this.areaName = entity.getAreaName();
        this.deptName = entity.getDeptName();
        this.assetsState = entity.getAssetsState();
        this.categoryId = entity.getCategoryId();
    }

    @Override
    public AssetsCheckNote convertToEntity(){
        return new AssetsCheckNote(this);
    }


    @ApiModelProperty(value = "盘点明细ID")
    @TableId(value = "note_id", type = IdType.AUTO)
    private Integer noteId;

    @ApiModelProperty(value = "计划ID")
    private String planId;

    @ApiModelProperty(value = "1手工盘点 2RFID扫描 3二维码扫描")
    private Integer checkType;

    @ApiModelProperty(value = "资产使用部门")
    private String deptId;

    @ApiModelProperty(value = "资产所属区域")
    private String areaId;

    @ApiModelProperty(value = "资产ID")
    private String assetsId;

    @ApiModelProperty(value = "标签材质")
    private Integer lableType;

    @ApiModelProperty(value = "资产盘点状态")
    private Integer checkState;

    @ApiModelProperty(value = "盘点描述")
    private String checkDescribe;

    @ApiModelProperty(value = "盘点照片列表")
    private String photoList;

    @ApiModelProperty(value = "资产类别ID")
    private String categoryId;

    @ApiModelProperty(value = "盘点时间")
    private String checkTime;

    @ApiModelProperty(value = "盘点人ID")
    private String checkUserId;

    @ApiModelProperty(value = "盘点人")
    private String checkUser;

    @ApiModelProperty(value = "审核状态(0待审核 1审核通过 2审核不通过)")
    private Integer reviewState;

    @ApiModelProperty(value = "审核时间")
    private Date reviewTime;

    @ApiModelProperty(value = "汇总数量值")
    private Integer summaryNumber;

    @ApiModelProperty(value = "审核人ID")
    private String reviewUserId;

    @ApiModelProperty(value = "审核人")
    private String reviewUser;

    @ApiModelProperty(value = "图片列表")
    @TableField(exist = false)
    private List pictureUrl;

    @ApiModelProperty(value = "盘点图片列表")
    @TableField(exist = false)
    private List checkPictureUrl;

    @ApiModelProperty(value = "固定资产名称")
    @TableField(exist = false)
    private String assetsName;

    @ApiModelProperty(value = "区域名称")
    @TableField(exist = false)
    private String areaName;

    @ApiModelProperty(value = "部门名称")
    @TableField(exist = false)
    private String deptName;

    @ApiModelProperty(value = "资产状态")
    @TableField(exist = false)
    private String assetsState;
}
